package edu.must.uh.servlet;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
import edu.must.uh.util.R;
import edu.must.uh.util.SqlUtils;
import edu.must.uh.util.Tools;

@WebServlet("/SysServlet")
public class SysServlet extends BaseServlet {
    private static final long serialVersionUID = 12197442526341123L;
    private static Logger logger = Logger.getLogger(SysServlet.class);  
    
    public Object getIPAddress(HttpServletRequest request, HttpServletResponse response) throws Exception {      
     
        String IPAddress= Tools.getIpAddr(request);
        
       // SqlUtils.getMySqlInstance().getlist("SELECT now() from dual;");
       // SqlUtils.getMsSqlInstance().getlist("select top 1 convert(varchar,getdate(),120) FROM T_HEALTH_RPT_LOGORDER");
        return R.succ(IPAddress);         
    }
    
   
}
